home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / answers / rec / rec-photo / lenses / tutorial < prev    next >
Text File  |  1994-03-21  |  21KB  |  434 lines

  1. Newsgroups: rec.photo,rec.answers,news.answers
  2. Path: bloom-beacon.mit.edu!hookup!swrinde!sdd.hp.com!hpscit.sc.hp.com!hplextra!cello!jacobson
  3. From: jacobson@cello.hpl.hp.com (David Jacobson)
  4. Subject: Photographic Lenses Tutorial
  5. Summary:  This posting contains a summary of optical facts for photographers.
  6.     It is more detailed that a FAQ file, but less so than a text book.  
  7.     It covers focusing, apertures, bellows correction, depth of field, 
  8.     hyperfocal distance, and diffraction.
  9. Message-ID: <1994Mar22.033240.25913@cello.hpl.hp.com>
  10. Supersedes: <1994Feb22.173527.14991@cello.hpl.hp.com>
  11. Approved: news-answers-request@MIT.EDU
  12. Date: Tue, 22 Mar 1994 03:32:40 GMT
  13. Expires: Fri, 22 Apr 1994 06:00:00 GMT
  14. Organization: Hewlett-Packard Laboratories
  15. Followup-To: rec.photo
  16. Lines: 415
  17. Xref: bloom-beacon.mit.edu rec.photo:44486 rec.answers:4567 news.answers:16724
  18.  
  19. Archive-name: rec-photo/lenses/tutorial
  20. Last-modified 1993/10/03
  21. Version: 1.0
  22.  
  23. Lens Tutorial
  24. by David M. Jacobson
  25. jacobson@hpl.hp.com
  26. Minor revisions October 3, 1993
  27.  
  28. This note gives a tutorial on lenses and gives some common lens
  29. formulas.  I attempted to make it between an FAQ (just simple facts)
  30. and a textbook.  I generally give the starting point of an idea, and
  31. then skip to the results, leaving out all the algebra.  If any part of
  32. it is too detailed, just skip ahead to the result and go on.  
  33.  
  34. It is in 4 parts.  The first gives formulas relating subject and image
  35. distances and magnification, the second discusses f-stops, the third
  36. discusses depth of field, and the fourth part discusses diffraction.
  37. The theory is simplified to that for lenses with the same medium front
  38. and rear (eg air): the theory for underwater or oil immersion lenses
  39. is a bit more complicated.
  40.  
  41.  
  42. Subject distance, image distance, and magnification
  43.  
  44. In lens formulas it is convenient to measure distances from a set of
  45. points called "principal points".  There are two of them, one for the
  46. front of the lens and one for the rear, more properly called the
  47. primary principal point and the secondary principal point.  While most
  48. lens formulas expect the subject distance to be measured from the
  49. front principal point, most focusing scales are calibrated to read the
  50. distance from the subject to the film plane.  So you can't use the
  51. distance on your focusing scale in most calculations, unless you only
  52. need an approximate distance.  Another interpretation of principal
  53. points is that a (probably virtual) object at the primary principal
  54. point formed by light entering from the front will appear from the
  55. rear to as a (probably virtual) image at the secondary principal point
  56. with magnification exactly one.
  57.  
  58.  
  59. "Nodal points" are the two points such that a light ray entering the
  60. front of the lens and headed straight toward the front nodal point
  61. will emerge going a straight way from the rear nodal point at exactly
  62. the same angle to the lens's axis as the entering ray had.  The nodal
  63. points are equivalent to the principal points when the front and rear
  64. media are the same, eg air, so for practical purposes the terms can be
  65. used interchangeably.  And again, the more proper terms are primary
  66. nodal point and secondary nodal point.
  67.  
  68. In simple double convex lenses the two principal points are somewhere
  69. inside the lens (actually 1/n-th the way from the surface to the
  70. center, where n is the index of refraction), but in a complex lens
  71. they can be almost anywhere, including outside the lens, or with the
  72. rear principal point in front of the front principal point.  In a lens
  73. with elements that are fixed relative to each other, the principal
  74. points are fixed relative to the glass.  In zoom or internal focusing
  75. lenses the principal points may move relative to the glass and each
  76. other when zooming or focusing.
  77.  
  78. When the lens is focused at infinity, the rear principal point is
  79. exactly one focal length in front of the film.  To find the front
  80. principal point, take the lens off the camera and let light from a
  81. distant object pass through it "backwards".  Find the point where the
  82. image is formed, and measure toward the lens one focal length.  With
  83. some lenses, particularly ultra wides, you can't do this, since the
  84. image is not formed in front of the front element.  (This all assumes
  85. that you know the focal length.  I suppose you can trust the
  86. manufacture's numbers enough for educational purposes.)
  87.  
  88.  
  89. So      subject (object) to front principal point distance.
  90. Si      rear principal point to image distance
  91. f       focal length
  92. M       magnification
  93.  
  94. 1/So + 1/Si = 1/f
  95. M = Si/So 
  96. (So-f)*(Si-f) = f^2
  97. M = f/(So-f) = (Si-f)/f
  98.  
  99. If we interpret Si-f as the "extension" of the lens beyond infinity
  100. focus, then we see that it is inversely proportional to a similar
  101. "extension" of the subject.
  102.  
  103. For rays close to and nearly parallel to the axis (these are called
  104. "paraxial" rays) we can approximately model most lenses with just two
  105. planes perpendicular to the optic axis and located at the principal
  106. points.  "Nearly parallel" means that for the angles involved, theta
  107. ~= sin(theta) ~= tan(theta).  ("~=" means approximately equal.)  These
  108. planes are called principal planes.
  109.  
  110. The light can be thought of as proceeding to the front principal
  111. plane, then jumping to a point in the rear principal plane exactly the
  112. same displacement from the axis and simultaneously being refracted
  113. (bent).  The angle of refraction is proportional the distance from the
  114. center at which the ray strikes the plane and inversely proportional
  115. to the focal length of the lens.  (The "front principal plane" is the
  116. one associated with the front of the lens.  I could be behind the rear
  117. principal plane.)
  118.  
  119.  
  120. Apertures, f-stop, bellows correction factor, pupil magnification
  121.  
  122. We define more symbols
  123.  
  124. D       diameter of the entrance pupil, i.e. diameter of the aperture as
  125.         seen from the front of the lens
  126. N       f-number (or f-stop)  D = f/N, as in f/5.6
  127. Ne      effective f-number (corrected for "bellows factor",
  128.         but not absorption)
  129.  
  130. Light from a subject point spreads out in a cone whose base is the
  131. entrance pupil.  (The entrance pupil is the virtual image of the
  132. diaphragm formed by the lens elements in front of the diaphragm.)  The
  133. fraction of the total light coming from the point that reaches the
  134. film is proportional to the solid angle subtended by the cone.  If the
  135. entrance pupil is distance y in front of the front nodal point, this
  136. is approximately proportional to D^2/(So-y)^2.  (Usually we can ignore
  137. y.)  If the magnification is M, the light from a tiny subject patch of
  138. unit area gets spread out over an area M^2 on the film, and so the
  139. brightness on the film is inversely proportional to M^2.  With some
  140. algebraic manipulation and assuming y=0 it can be shown that the
  141. relative brightness is
  142.  
  143. (D/So)^2/M^2 = 1/(N^2 * (1+M)^2).
  144.  
  145. Thus in the limit as So -> infinity and thus M -> 0, which is the usual
  146. case, the brightness on the film is inversely proportional to the
  147. square of the f-stop, N, and independent of the focal length.
  148.  
  149. For larger magnifications, M, the intensity on the film in is somewhat
  150. less then what is indicated by just 1/N^2, and the correction is
  151. called bellows factor.  The short answer is that bellows factor when
  152. y=0 is just (1+M)^2.  We will first consider the general case when
  153. y != 0.
  154.  
  155. Let us go back to the original formula for the relative brightness on
  156. the film.
  157.  
  158. (D/(So-y))^2/M^2
  159.  
  160. The distance, y, that the aperture is in front of the front nodal
  161. point, however, is not readily measurable.  It is more convenient to
  162. use "pupil magnification".  Analogous to the entrance pupil is the
  163. exit pupil, which is the virtual image of the diaphragm formed by any
  164. lens elements behind the diaphragm.  The pupil magnification is the
  165. ratio of exit pupil diameter to the entrance pupil diameter.
  166.  
  167. p       pupil magnification (exit_pupil_diameter/entrance_pupil_diameter)
  168.  
  169. For all symmetrical lenses and most normal lenses the aperture appears
  170. the same from front and rear, so p~=1.  Wide angle lenses frequently
  171. have p>1, while true telephoto lenses usually have p<1.  It can be
  172. shown that y = f*(1-1/p), and substituting this into the above
  173. equation and carrying out some algebraic manipulation yields that the
  174. relative brightness on the film is proportional to
  175.  
  176. 1/(N^2 ( 1 + M/p)^2)
  177.  
  178. Let us define Ne, the effective f-number, to be an f-number with the
  179. lens focused at infinity (M=0) that would give the same relative
  180. brightness on the film (ignoring light loss due to absorption and
  181. reflection) as the actual f-number N does with magnification M.
  182.  
  183. Ne = N*(1+M/p)
  184.  
  185. An alternate, but less fundamental, explanation of bellows correction
  186. is just the inverse square law applied to the exit pupil to film
  187. distance.  Ne is exit_pupil_to_film_distance/exit_pupil_diameter.
  188.  
  189. It is convenient to think of the correction in terms of f-stops
  190. (powers of two).  The correction in powers of two (stops) is
  191. 2*Log2(1+M/p) = 6.64386 Log10(1+M/p).  Note that for most normal
  192. lenses y=0 and thus p=1, so the M/p can be replaced by just M in the
  193. above equations.
  194.  
  195.  
  196.  
  197. Circle of confusion, depth of field and hyperfocal distance.
  198.  
  199. The light from a single subject point passing through the aperture is
  200. converged by the lens into a cone with its tip at the film (if the
  201. point is perfectly in focus) or slightly in front of or behind the
  202. film (if the subject point is somewhat out of focus).  In the out of
  203. focus case the point is rendered as a circle where the film cuts the
  204. converging cone or the diverging cone on the other side of the image
  205. point.  This circle is called the circle of confusion.  The farther
  206. the tip of the cone, ie the image point, is away from the film, the
  207. larger the circle of confusion.
  208.  
  209. Consider the situation of a "main subject" that is perfectly in
  210. focus, and an "alternate subject point" this is in front of or
  211. behind the subject.
  212.  
  213. Soa     alternate subject point to front principal point distance
  214. Sia     rear principal point to alternate image point distance
  215. h       hyperfocal distance
  216. C       diameter of circle of confusion
  217. c       diameter of largest acceptable circle of confusion
  218. N       f-stop (focal length divided by diameter of entrance pupil)
  219. Ne      effective f-stop Ne = N * (1+M/p)
  220. D       the aperture (entrance pupil) diameter (D=f/N)
  221. M       magnification (M=f/(So-f))
  222.  
  223. The diameter of the circle of confusion can be computed by similar
  224. triangles, and then solved in terms of the lens parameters and subject
  225. distances.  For a while let us assume unity pupil magnification, i.e. P=1.
  226.  
  227. When So is finite
  228. C = D*(Sia-Si)/Sia = f^2*(So/Soa-1)/(N*(So-f))
  229. When So = Infinity, 
  230. C = f^2/(N Soa)
  231.  
  232.     
  233. Note that in this formula C is positive when the alternate image point
  234. is behind the film (i.e. the alternate subject point is in front of
  235. the main subject) and negative in the opposite case.  In reality, the
  236. circle of confusion is always positive and has a diameter equal to
  237. Abs(C).
  238.  
  239. If the circle of confusion is small enough, given the magnification in
  240. printing or projection, the optical quality throughout the system,
  241. etc., the image will appear to be sharp.  Although there is no one
  242. diameter that marks the boundary between fuzzy and clear, .03 mm is
  243. generally used in 35mm work as the diameter of the acceptable circle
  244. of confusion.  (I arrived at this by observing the depth of field
  245. scales or charts on/with a number of lenses from Nikon, Pentax, Sigma,
  246. and Zeiss.  All but the Zeiss lens came out around .03mm.  The Zeiss
  247. lens appeared to be based on .025 mm.)  Call this diameter c.
  248.  
  249. If the lens is focused at infinity (so the rear principal point to film
  250. distance equals the focal length), the distance to closest point that
  251. will be acceptably rendered is called the hyperfocal distance.
  252.  
  253. h = f^2/(N*c)
  254.  
  255. If the main subject is at a finite distance, the closest
  256. alternative point that is acceptably rendered is at at distance
  257.  
  258. Sclose = h So/(h + (So-F))
  259.  
  260. and the farthest alternative point that is acceptably rendered is at
  261. distance
  262.  
  263. Sfar = h So/(h - (So - F))
  264.  
  265. except that if the denominator is zero or negative, Sfar = infinity.
  266.  
  267. We call Sfar-So the rear depth of field and So-Sclose the front depth
  268. field.  
  269.  
  270. A form that is exact, even when P != 1, is 
  271.  
  272. depth of field = c Ne / (M^2 * (1 +or- (So-f)/h1)) 
  273.                = c N (1+M/p) / (M^2 * (1 +or- (N c)/(f M))
  274.  
  275. where h1 = f^2/(N c), ie the hyperfocal for distance given c, N, and f
  276. and assuming P=1.  Use + for front depth of field and - for rear depth
  277. of field.  If the denominator goes zero or negative, the rear depth of
  278. field is infinity.  
  279.  
  280. This is a very nice equation.  It shows that for distances short with
  281. respect to the hyperfocal distance, the depth of field is very close
  282. to just c*Ne/M^2.  As the distance increases, the rear depth of field
  283. gets larger than the front depth of field.  The rear depth of field is
  284. twice the front depth of field when So-f is one third the hyperfocal
  285. distance.  And when So-f = h1, the rear depth of field extends to
  286. infinity.  
  287.  
  288. If we frame a subject the same way with two different lenses, i.e.
  289. M is the same both both situations, the shorter focal length lens will
  290. have less front depth of field and more rear depth of field at the
  291. same effective f-stop.  (To a first approximation, the depth of field
  292. is the same in both cases.)
  293.  
  294. Another important consideration when choosing a lens focal length is
  295. how a distant background point will be rendered.  Points at infinity
  296. are rendered as circles of size
  297.  
  298. C =  f M / N
  299.  
  300. So at constant subject magnification a distant background point will
  301. be blurred in direct proportion to the focal length.
  302.  
  303. This is illustrated by the following example, in which lenses of 50mm
  304. and 100 mm focal lengths are both set up to get a magnification of
  305. 1/10.  Both lenses are set to f/8.  The graph shows the circle of
  306. confusions for points as a function of the distance behind the
  307. subject.
  308.  
  309. circle of confusion (mm)    
  310.      #               
  311.      #               *** 100mm f/8
  312.      #               ... 50mm f/8                                             
  313.  0.8 #                                                               *******   
  314.      #                                                      *********          
  315.      #                                             *********                   
  316.      #                                         ****                            
  317.      #                                    *****                                
  318.      #                                ****                                     
  319.  0.6 #                            ****                                         
  320.      #                       *****                                   .......   
  321.      #                    ***                      ..................          
  322.      #                  **            .............                            
  323.  0.4 #              ****     .........                                         
  324.      #           ***     ....                                                  
  325.      #         **   .....                                                      
  326.      #        * ....                                                           
  327.      #      **..                                                               
  328.  0.2 #    **.                                                                  
  329.      #  .*.                                                                    
  330.      # **                                                                      
  331.      #*                                                                        
  332.      *######################################################################   
  333.    0 #                                                                         
  334.              250    500       750     1000     1250    1500     1750     2000  
  335.                    distance behind subject (mm)
  336.  
  337. The standard .03mm circle of confusion criterion is clear down in the
  338. ascii fuzz.  The slope of both graphs is the same near the origin,
  339. showing that to a first approximation both lenses have the same depth
  340. of field.  However, the limiting size of the circle of confusion as
  341. the distance behind the subject goes to infinity is twice as large for
  342. the 100mm lens as for the 50mm lens.
  343.  
  344.  
  345. Diffraction
  346.  
  347. When a beam of parallel light passes through a circular aperture it
  348. spreads out a little, a phenomenon known as diffraction.  The smaller
  349. the aperture, the more the spreading.  The field strength (of the
  350. electric or magnetic field) at angle phi from the axis is
  351. proportional to
  352.  
  353. lambda/(phi Pi R) * BesselJ1(2 phi Pi R/lambda), 
  354.  
  355. where R is the radius of the aperture, lambda is the wavelength of the
  356. light, and BesselJ1 is the first order Bessel function. The power
  357. (intensity) is proportional to the square of this.
  358.  
  359. The field strength function forms a bell-shaped curve, but unlike the
  360. classic E^(-x^2) one, it eventually oscillates about zero.  Its first
  361. zero at 1.21967 lambda/(2 R).  There are actually an infinite number
  362. of lobes after this, but about 86% of the power is in the circle
  363. bounded by the first zero.
  364.  
  365.  
  366.     Relative field strength
  367.  
  368.      ***                                                                       
  369.    1 #  ****                                                                   
  370.      #      **                                                                 
  371.  0.8 #        *                                                                
  372.      #         **                                                              
  373.      #           *                                                             
  374.      #            **                                                           
  375.      #              *                                                          
  376.  0.6 #               *                                                         
  377.      #                *                                                        
  378.      #                 *                                                       
  379.  0.4 #                  *                                                      
  380.      #                   *                                                     
  381.      #                    **                                                   
  382.  0.2 #                      **                                                 
  383.      #                        **                                               
  384.      #                          **                         *****************   
  385.    ###############################*###################*****################### 
  386.      #                             *****        ******                         
  387.      #          0.5         1          1.5******    2         2.5          3   
  388.                                                                                
  389.  
  390.         Angle from axis (relative to lambda/diameter_of_aperture)
  391.  
  392.  
  393. Approximating the diaphragm to film distance as f and making use of
  394. the fact that the aperture has diameter f/N, it follows directly that
  395. the diameter of the first zero of the diffraction pattern is
  396. 2.43934*N*lambda.  Applying this in a normal photographic situation is
  397. difficult, since the light contains a whole spectrum of colors.  We
  398. really need to integrate over the visible spectrum.  The eye has
  399. maximum sensitive around 555 nm, in the yellow green.  If, for
  400. simplicity, we take 555 nm as the wavelength, the diameter of the
  401. first zero, in mm, comes out to be 0.00135383 N.
  402.  
  403. As was mentioned above, the normally accepted circle of confusion for
  404. depth of field is .03 mm, but .03/0.00135383 = 22.1594, so we can
  405. see that at f/22 the diameter of the first zero of the diffraction
  406. pattern is as large is the acceptable circle of confusion.
  407.  
  408. A common way of rating the resolution of a lens is in line pairs per
  409. mm. It is hard to say when lines are resolvable, but suppose that we
  410. use a criterion that the center of the dark area receive no more than
  411. 80% of the light power striking the center of the lightest areas.
  412. Then the resolution is 0.824 /(lambda*N) lpmm.  If we again assume
  413. 555 nm, this comes out to 1485/N lpmm, which is in close agreement
  414. with the widely used rule of thumb that the resolution is diffraction
  415. limited to 1500/N lpmm.
  416.  
  417.  
  418. Acknowledgements
  419.  
  420. Thanks to John Bercovitz, donl, and Bill Tyler for reviewing an
  421. earlier version of this note.  I've made extensive changes since their
  422. review, so any remaining bugs are mine, not a result of their
  423. oversight.  All of them told me it was too detailed.  I probably
  424. should have listened.
  425.  
  426. Copyright (C) 1993, David M. Jacobson 
  427.  
  428. Rec.photo readers are granted permission to make a reasonable number
  429. electronic or paper copies for their themselves, their friends and
  430. colleagues.  Other publication, or commercial or for-profit use is
  431. prohibited.
  432.  
  433.  
  434.